package com.zxy.supplier_system.server.controller

import com.zxy.supplier_system.server.entity.Authority
import com.zxy.supplier_system.server.service.ProcurementPaymentRecordService
import org.springframework.web.bind.annotation.DeleteMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("procurements/paymentRecords")
class ProcurementPaymentRecordController(
    private val procurementPaymentRecordService: ProcurementPaymentRecordService,
) {
    @HasAuthority(Authority.采购_账目_删除)
    @DeleteMapping("{id}")
    fun deletePaymentRecords(@PathVariable id: Int){
        return this.procurementPaymentRecordService.delete(id)
    }
}